var Connect = YAHOO.util.Connect,
Panel = YAHOO.widget.Panel,
KeyListener = YAHOO.util.KeyListener,
Event = YAHOO.util.Event,
Dom = YAHOO.util.Dom,
Json = YAHOO.lang.JSON;
var MyController = {

    asyncRequestFalse:function(){
        alert('AsyncRequest False');
    },

    resetForm:function(formId){
        document.getElementById(formId).reset();
    },
    
    custommerRegister:function(){
        var strUrl = '/custommerRegister/?ajax=1';
        YAHOO.util.Connect.setForm('customerRegister');
        YAHOO.util.Connect.asyncRequest ('POST', strUrl, {
            success: MyController.custommerRegisterSuccess,
            failure: MyController.asyncRequestFalse
        });
        YAHOO.util.Connect.resetFormState();
    },

    custommerRegisterSuccess:function(xmlhttp){
        var strJsonData = xmlhttp.responseText;
        var aryData = Json.parse(strJsonData);
        if(aryData.intOk == 1){
            alert(aryData.message);
        }else{
            alert(aryData.strError);
        }
    }
}


